/********************************************************************************
 * Project Name		[JavaEE_Web]
 * File Name     	[Authority.java]
 * Creation Date 	[2015-01-01]
 * 
 * Copyright© ge.y.yang@gmail.com All Rights Reserved
 * 
 * Work hard, play harder, think big and keep fit
 ********************************************************************************/
package filter.acl.bean;

import java.util.Objects;

/**
 * 权限
 * 
 * @author 不落的太阳(Sean Yang aka ShortPeace)
 * @version 1.0
 * @since jdk 1.8
 * 
 */
public class Authority {

	// 显示到页面上的权限名称<br/>
	private String displayName;
	// 权限对应的URL, 一个权限对应一个URL
	private String url;

	public Authority() {
		super();
	}

	public Authority(String displayName, String url) {
		super();
		this.displayName = displayName;
		this.url = url;
	}

	public String getDisplayName() {
		return displayName;
	}

	public void setDisplayName(String displayName) {
		this.displayName = displayName;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	@Override
	public int hashCode() {
		return Objects.hashCode(url);
	}

	@Override
	public boolean equals(Object obj) {
		return Objects.equals(this.getUrl(), ((Authority) obj).getUrl());
	}
}
